<script>
	export default {
		onLaunch: function() {
			// console.log('App Launch')
		},
		onShow: function() {
			// 获取当前用户信息
			var userInfo = uni.getStorageSync("userInfo")
			if (userInfo == "") {
				// 关闭所有页面跳转登录页面 同时关闭定时任务
				uni.reLaunch({
					url:'pages/login/addAndRegister/addAndRegister',
					animationType: 'pop-in',
					animationDuration: 200
				})
			} else {
				// 创建webSocket连接
				this.utils.connectSocketInit(userInfo.id);
			}
			
			// console.log('App Show')
		},
		onHide: function() {
			// console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */
	@import url("@/static/css/iconfont.css");
	
	@import url("@/static/css/global.css");
	
/* 	
	.titleNview-placing{
		height: var(--status-bar-height);
		padding-top: 44px;
		box-sizing: content-box;
	} */
	
	/* colorUi组件 */
	@import "@/static/ccjp-SlideVerification/colorui/main.css";
	@import "@/static/ccjp-SlideVerification/colorui/icon.css";
	
	/* colorUi组件 */
	@import "@/static/ccjp-SlideVerification/index-app.css";
	
</style>
